package com.xbb.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.xbb.entity.Teacher;
import com.xbb.entity.dto.TeacherDto;
import com.xbb.mapper.TeacherMapper;
import com.xbb.service.TeacherService;
@Service
public class TeacherServiceImpl implements TeacherService{

	@Autowired
	TeacherMapper teacherMapper;
	
	@Override
	public List<TeacherDto> getTeas(TeacherDto teacherDto) {
		return teacherMapper.getTeas(teacherDto);
	}

	@Override
	public boolean addTea(Teacher teacher) {
		return teacherMapper.addTea(teacher);
	}

	@Override
	public boolean updateTea(Teacher teacher) {
		return teacherMapper.updateTea(teacher);
	}

	@Override
	public boolean delTea(int tid) {
		return teacherMapper.delTea(tid);
	}


	@Override
	public Teacher getTeaById(int id) {
		return teacherMapper.getTeaById(id);
	}

	@Override
	public List<TeacherDto> queryByIds(String ids) {
		String[] split = ids.split(",");
		return teacherMapper.queryByIds(split);
	}

	
}
